<%@page import="java.util.*"%>
<%@page import="util.*"%>
<%@page pageEncoding="UTF-8"%>
<%@ page import="gestores.pagina.GestorPrincipal"%>
<%
//String camCodigo = (String) request.getAttribute("codCampania");
HashMap s =(HashMap) session.getAttribute("microCampania");
String camCodigo =(String) s.get("codigo_campania");
ArrayList<HashMap> articulos = GestorPrincipal.obtenerArticulosMasConsultados(camCodigo, "-1");

%>
<table  border="0" cellpadding="0" cellspacing="0">
<tr>

<td width="210"   valign="top" class="HTextoNegr10Px">
    <table>
            <tr>
                <td>
                    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="210" height="90">
                        <param name="movie" value="vistas/pagina/flash/banner_1_1024.swf">
                        <param name="quality" value="high">
                        <embed src="vistas/pagina/flash/banner_1_1024.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="210" height="90"></embed>
                    </object>
                </td>
            </tr>
        </tr>
            <td background="vistas/pagina/imagenes/divisoria_celeste_2.jpg" width="210"   height="22">
            </td>
        </tr>
    <%
    String noticia = "";
    RssRead rss = new RssRead();
    Vector vector = new  Vector();
    int z =0 ;
    
    vector.add("http://ar.rd.yahoo.com/fp/nws/rss/*http://d.yimg.com/ar.rss.news.yahoo.com/rss/tecnologia");
    for(int j=0;j<vector.size();j++){
        
        Vector v = rss.getRSSImages((String)vector.get(j));
        
        for(int i=0;i<v.size();i++){
            if(z==1){break;}
            if(((ImageInfo)v.get(i)).description.contains(new StringBuffer("<img")) ){
                z++;
                noticia = ((ImageInfo)v.get(i)).description;
                noticia = noticia.replaceFirst("<img ","<img hspace=\"5\" vspace=\"5\"");
    %>
    <tr>
        <tr valign="top">
            <td class="HExhibidorTitulo"> <a href="javascript:window.open('<%=((ImageInfo)v.get(i)).urlname%>');"><center><%= ((ImageInfo)v.get(i)).title %></a></center>
            </td>
        </tr>
        <tr>
            <td width="217"><font size="-2"><%=noticia%></font>
            </td>
        </tr>
        
    </tr>
    <tr>
        <td >
            
        </td>
    </tr>
    
    
    <%
            }}
    }//fin for hash
    %>
    <!-- fin tr rss -->
    <tr>
        <td>&nbsp;</td>
    </tr>
    
    <!--inicio exhibidores -->
    <tr>
        <td class="hfondoBuscados">
            <div class="HTextoBlanc13PxCenter">LOS MAS BUSCADOS</div>
        </td>
    </tr>
    <%
        for(HashMap item: articulos){
            int tamanio = ((ArrayList<HashMap>) item.get("fotos")).size();
            String foto = "sinFoto";
            if( tamanio > 0 && !((String)((ArrayList<HashMap>) item.get("fotos")).get(0).get("fawCodigo")).equals("")){foto =(String)((ArrayList<HashMap>) item.get("fotos")).get(0).get("fawCodigo");}
    %>
    <tr>
        <td width="217" height="73">
            <!-- inicio exhibidor 1 -->
            <table id="Tabla_01" width="210"   height="73" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td rowspan="2" width="75" height="73" align="center">
                        <a href='index?accion=articulo&art=<%=item.get("artCodigo")%>'>
                            <img border="0" src='./img/articulos/<%=foto%>_lista.jpg' />
                        </a>
                    </td>
                    <td width="142" height="51" valign="top">
                        <div class="HTextoNegr11PxCenter"><a href='index?accion=articulo&art=<%=item.get("artCodigo")%>'><%=Utiles.formatearTexto(item.get("artNombre").toString())%></a></div>
                    </td>
                </tr>
                <tr>
                    <td width="142" height="22" align="center">
                        <div class="HExhibidorHomeTexto1">$ <%=item.get("arcPrecioDescuento")%></div>
                    </td>
                </tr>
            </table>
            <!-- fin exhibidor 1 -->
        </td>
    </tr>
    <!--inicio linea punteada -->
    <tr>
        <td background="vistas/pagina/imagenes/linea_puntos.jpg" width="217" height="2">
        </td>
    </tr>
    <%}%>
    <!--Termino articulos mas visitados-->
    <!--fin linea punteada -->

    <!-- inicio tr flash -->
    <tr>
        <td width="210"   align="center">
            <!--
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="210"   height="320">
                <param name="movie" value="vistas/pagina/flash/200x320.swf">
                <param name="quality" value="high">
                <embed src="vistas/pagina/flash/200x320.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="210"   height="320"></embed>
            </object>
            -->
        </td>
    </tr>
    <!--fin tr flash -->
    </table>
</td>
</tr>
</table>


